package com.sxau.software_educational_system_backend.context;

import com.sxau.software_educational_system_backend.domain.entity.Admin;

public class BaseContext {

    public static ThreadLocal<Admin> threadLocal = new ThreadLocal<>();

    public static void setCurrentUser(Admin admin) {
        threadLocal.set(admin);
    }

    public static Admin getCurrentUser() {
        return threadLocal.get();
    }

    public static void removeCurrentUser() {
        threadLocal.remove();
    }

}
